const express = require('express')
const userCtrl = require('../controller/user')
const router = express.Router()

//用户登录
router.get('/users/login', userCtrl.login)

//用户注册
router.post('/users', userCtrl.register)

//获取当前登录用户
router.get('/user', userCtrl.getCurrentUser)

//更新登录用户资料
router.put('/users/login', userCtrl.updateCurrentUser)

module.exports = router
